<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jerky: Jerky.Core.JerkyEngine Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Jerky
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_jerky.html">Jerky</a></li><li class="navelem"><a class="el" href="namespace_jerky_1_1_core.html">Core</a></li><li class="navelem"><a class="el" href="class_jerky_1_1_core_1_1_jerky_engine.html">JerkyEngine</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_jerky_1_1_core_1_1_jerky_engine-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">Jerky.Core.JerkyEngine Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Jerky引擎  
 <a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a040f8fc5d5a0df0417038b43946ebcca" id="r_a040f8fc5d5a0df0417038b43946ebcca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a040f8fc5d5a0df0417038b43946ebcca">JerkyEngine</a> (string path)</td></tr>
<tr class="memdesc:a040f8fc5d5a0df0417038b43946ebcca"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造方法  <br /></td></tr>
<tr class="separator:a040f8fc5d5a0df0417038b43946ebcca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3baed666ad07b3524ce8a3c3691b9254" id="r_a3baed666ad07b3524ce8a3c3691b9254"><td class="memItemLeft" align="right" valign="top">async Task&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3baed666ad07b3524ce8a3c3691b9254">ReplaceBookmarksAsync</a> (IDictionary&lt; string, object &gt; bookmarkReplacements)</td></tr>
<tr class="memdesc:a3baed666ad07b3524ce8a3c3691b9254"><td class="mdescLeft">&#160;</td><td class="mdescRight">替换书签  <br /></td></tr>
<tr class="separator:a3baed666ad07b3524ce8a3c3691b9254"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="properties" name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a94de2ab95b1b1c953791115a57926acf" id="r_a94de2ab95b1b1c953791115a57926acf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a94de2ab95b1b1c953791115a57926acf">TrimNumber</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a94de2ab95b1b1c953791115a57926acf"><td class="mdescLeft">&#160;</td><td class="mdescRight">是否去除数字  <br /></td></tr>
<tr class="separator:a94de2ab95b1b1c953791115a57926acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Jerky引擎 </p>
<p>进行书签替换操作</p>
<div class="fragment"><div class="line">var path = <span class="stringliteral">&quot;path/to/your docx file&quot;</span>;</div>
<div class="line">var engine = <span class="keyword">new</span> <a class="code hl_function" href="#a040f8fc5d5a0df0417038b43946ebcca">JerkyEngine</a>(path);</div>
<div class="line"> </div>
<div class="line">var dict = <span class="keyword">new</span> Dictionary&lt;string,string&gt;</div>
<div class="line">{</div>
<div class="line">    [<span class="stringliteral">&quot;XAUAT&quot;</span>] = <span class="stringliteral">&quot;西建大&quot;</span>,</div>
<div class="line">    [<span class="stringliteral">&quot;MIFANS&quot;</span>] = <span class="stringliteral">&quot;米粉&quot;</span></div>
<div class="line">};</div>
<div class="line">E</div>
<div class="line">var replacedTags = engine.ReplaceBookmarksAsync(dict).Result;</div>
<div class="line"><span class="comment">// var replacedTags = await engine.ReplaceBookmarksAsync(dict);</span></div>
<div class="line">Console.WriteLine($<span class="stringliteral">&quot;操作完成，共替换{replacedTags}处书签&quot;</span>);</div>
<div class="ttc" id="aclass_jerky_1_1_core_1_1_jerky_engine_html_a040f8fc5d5a0df0417038b43946ebcca"><div class="ttname"><a href="#a040f8fc5d5a0df0417038b43946ebcca">Jerky.Core.JerkyEngine.JerkyEngine</a></div><div class="ttdeci">JerkyEngine(string path)</div><div class="ttdoc">构造方法</div><div class="ttdef"><b>Definition</b> JerkyEngine.cs:49</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a040f8fc5d5a0df0417038b43946ebcca" name="a040f8fc5d5a0df0417038b43946ebcca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a040f8fc5d5a0df0417038b43946ebcca">&#9670;&#160;</a></span>JerkyEngine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Jerky.Core.JerkyEngine.JerkyEngine </td>
          <td>(</td>
          <td class="paramtype">string</td>          <td class="paramname"><span class="paramname"><em>path</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造方法 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>文档路径</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3baed666ad07b3524ce8a3c3691b9254" name="a3baed666ad07b3524ce8a3c3691b9254"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3baed666ad07b3524ce8a3c3691b9254">&#9670;&#160;</a></span>ReplaceBookmarksAsync()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">async Task&lt; int &gt; Jerky.Core.JerkyEngine.ReplaceBookmarksAsync </td>
          <td>(</td>
          <td class="paramtype">IDictionary&lt; string, object &gt;</td>          <td class="paramname"><span class="paramname"><em>bookmarkReplacements</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>替换书签 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bookmarkReplacements</td><td>书签字典&lt;书签名称,书签值(字符串替换)&gt;</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">FileNotFoundException</td><td>模板文件不存在</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a id="a94de2ab95b1b1c953791115a57926acf" name="a94de2ab95b1b1c953791115a57926acf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94de2ab95b1b1c953791115a57926acf">&#9670;&#160;</a></span>TrimNumber</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Jerky.Core.JerkyEngine.TrimNumber</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>是否去除数字 </p>
<p>若出现模板中多个书签对应同一个值时，可以将此值设为True,并且书签后可加数字用于区分，替换时将忽略书签后的数字</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Desktop/DocumentMaking/Jerky/Core/<b>JerkyEngine.cs</b></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
